<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">

	.wrap_right{
			
				width: 1000px;
				height: 680px;
				margin-left: 300px;
				margin-top: -600px;
			}
			
	.wrap_right1{
				width: 1000px;
				height: 310px;
				border: 1px solid #DDDDDD;
				
				
			}	
	
	.wrap_right2{
				width: 1000px;
				height: 260px;
				border: 1px solid #DDDDDD;
				margin-top: 10px;
			}
	.wrap_right3{
				width: 1000px;
				height: 50px;
				border-bottom: 1px solid #DDDDDD;
				margin-top: 0px;
			}
		.input{
				background-color:white;
				width:100px;
				height:40px;
				margin-left:240px;
				margin-top:5px;
		}	

		.wrap_right4{
				width: 1000px;
				height: 200px;
				border-bottom: 1px solid #DDDDDD;
				margin-top: 0px;
				display:none;
				
		}
		
		.wrap_right5{
				width: 1000px;
				height: 200px;
				border-bottom: 1px solid #DDDDDD;
				margin-top: 0px;
				
		}
		.wrap_input1{
				width:200px;
				height:30px;
				margin-left:130px;
				
		}


		.wrap_input2{
				margin-left:360px;
				width:100px;
				height:40px;
				margin-top:-40px;
				background-color:white;
		}
</style>
<script src="js/index/jquery-2.1.3.min.js"></script>
<script type="text/javascript">

function YZbutton(){
	if($(".wrap_right4").css("display")=='none'){
		$(".wrap_right4").css("display","block");
	}
}





function YZmoney(){
	var money =$("input[name='mo']").val();
	
	var xs=/^d*(?:.d{0,2})?$/;
	var cs=/^[1-9]\d*$/;
	var zzs= /^[1-9]*[1-9][0-9]*$/;
	if(!(zzs.test(money))){
		alert("请输入大于0的整数！");
		$("input[name=mo]").focus();
		return;
	
	}
	
	
	 $.ajax({
			url:"money",
			type:"get",
			data:{mon:$("input[name='mo']").val()},
			datatype:"json",
			success:function(e){
			alert(JSON.stringify(e));	
			location.href="ree";
				
	}
	 
		
});
	
}

/*$(function(){
	function YZbutton(){
		$(".wrap_right4").css("display","block");
	}
	
	
	});
*/
</script>

</head>




<body>
	<div class="wrap_right">

		<div class="wrap_right1">
		<div class="wrap_right3">
			<span style="line-height:50px;">&nbsp&nbsp&nbsp账户名：${user.name}</span>
		</div>
		<div class="wrap_right3">
			<span>&nbsp&nbsp&nbsp余额：${user.account}</span>
			<input type="button" value="充值" class="input" onclick="YZbutton()" >
		</div>
		
		<div class="wrap_right4">
		<span style="position:relative;top:25px;marign-left:20px;">请输入充值金额:</span><br/>
			<input class="wrap_input1" name="mo"/><br/>
			<input type="button" value="确认" class="wrap_input2" name="sure" onclick="YZmoney()">
		</div>
		
		</div>

	</div>
</body>
</html>